Field of the Invention
The present invention relates in general to programming and more particularly, compiling programming code.
Description of the Related Art
Each C or C++ program is compiled from one or more source files. Each file may contain static objects (objects with static storage duration) that are initialized when the program is launched or when a dynamic library is loaded. Initialization is the process of calculating and setting some value in an object. A compiler generates object files from the source files, which have an .obj extension on DOS and Windows® (WINDOWS is a registered trademark of Microsoft Corporation) systems and an .o extension on Linux® (LINUX is a registered trademark of Linux Torvalds) systems, and these object files are passed to a linker. The linker links the code that is to become the executable module (which has an .com or .exe extensions on Windows® system for example) or dynamic library (which has an .dll extension on Windows® system and .so extension on Linux® system for example).
Upon occasion, the code is written such that to initialize some static object from a File A, the value of another static object from File B is required. Thus, when the object from File A is initialized, the object from File B must already be initialized.